gboolean animate);
static void gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
GtkTreePath *path,
- gboolean clear_and_select);
+ gboolean clear_and_select,
+ gboolean clamp_node);
static void gtk_tree_view_column_autosize (GtkTreeView *tree_view,
GtkTreeViewColumn *tree_column);
tree_view->priv->focus_column = column;
if (event->state & GDK_CONTROL_MASK)
{
- gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
+ gtk_tree_view_real_set_cursor (tree_view, path, FALSE, TRUE);
gtk_tree_view_real_toggle_cursor_row (tree_view);
}
else if (event->state & GDK_SHIFT_MASK)
{
- gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
+ gtk_tree_view_real_set_cursor (tree_view, path, FALSE, TRUE);
gtk_tree_view_real_select_cursor_row (tree_view, FALSE);
}
else
{
- gtk_tree_view_real_set_cursor (tree_view, path, TRUE);
+ gtk_tree_view_real_set_cursor (tree_view, path, TRUE, TRUE);
}
/* the treeview may have been scrolled because of _set_cursor,
tree_view->priv->cursor = NULL;
if (tree_view->priv->selection->type == GTK_SELECTION_MULTIPLE)
- gtk_tree_view_real_set_cursor (tree_view, cursor_path, FALSE);
+ gtk_tree_view_real_set_cursor (tree_view, cursor_path, FALSE, FALSE);
else
- gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE);
+ gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, FALSE);
}
gtk_tree_view_queue_draw_path (tree_view, cursor_path, NULL);
gtk_tree_path_free (cursor_path);
if (new_cursor_node)
{
cursor_path = _gtk_tree_view_find_path (tree_view, new_cursor_tree, new_cursor_node);
- gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE);
+ gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, TRUE);
gtk_tree_path_free (cursor_path);
}
else
_gtk_rbtree_find_offset (tree_view->priv->tree, y, &cursor_tree, &cursor_node);
cursor_path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node);
g_return_if_fail (cursor_path != NULL);
- gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE);
+ gtk_tree_view_real_set_cursor (tree_view, cursor_path, TRUE, TRUE);
gtk_tree_view_clamp_node_visible (tree_view, cursor_tree, cursor_node);
gtk_tree_path_free (cursor_path);
}
}
path = _gtk_tree_view_find_path (tree_view, cursor_tree, cursor_node);
- gtk_tree_view_real_set_cursor (tree_view, path, TRUE);
+ gtk_tree_view_real_set_cursor (tree_view, path, TRUE, TRUE);
gtk_tree_path_free (path);
}
static void
gtk_tree_view_real_set_cursor (GtkTreeView *tree_view,
GtkTreePath *path,
- gboolean clear_and_select)
+ gboolean clear_and_select,
+ gboolean clamp_node)
{
GtkRBTree *tree = NULL;
GtkRBNode *node = NULL;
_gtk_tree_selection_internal_select_node (tree_view->priv->selection,
node, tree, path,
state, FALSE);
- gtk_tree_view_clamp_node_visible (tree_view, tree, node);
- _gtk_tree_view_queue_draw_node (tree_view, tree, node, NULL);
+ if (clamp_node)
+ {
+ gtk_tree_view_clamp_node_visible (tree_view, tree, node);
+ _gtk_tree_view_queue_draw_node (tree_view, tree, node, NULL);
+ }
}
g_signal_emit (G_OBJECT (tree_view), tree_view_signals[CURSOR_CHANGED], 0);
if (focus_column)
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (focus_column));
- gtk_tree_view_real_set_cursor (tree_view, path, TRUE);
+ gtk_tree_view_real_set_cursor (tree_view, path, TRUE, TRUE);
if (focus_column && focus_column->visible)
{
gtk_tree_view_scroll_to_cell (tree_view, path, column,
TRUE, 0.5, 0.5);
gtk_tree_selection_select_iter (selection, iter);
- gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
+ gtk_tree_view_real_set_cursor (tree_view, path, FALSE, TRUE);
if (path)
gtk_tree_path_free (path);
{
tree_view->priv->edited_column = column;
_gtk_tree_view_column_start_editing (column, GTK_CELL_EDITABLE (cell_editable));
- gtk_tree_view_real_set_cursor (tree_view, path, FALSE);
+ gtk_tree_view_real_set_cursor (tree_view, path, FALSE, TRUE);
GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
gtk_tree_view_put (tree_view,
GTK_WIDGET (cell_editable),